Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix intermittent delta panic issue #1832

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Conversation

jorritsandbrink
Copy link
Collaborator

@jorritsandbrink jorritsandbrink commented Sep 17, 2024

Description

Avoiding try_get_deltatable solves the issue.

I tested by running pipeline.py in a loop:

import os
import dlt
from dlt.destinations import filesystem

os.environ["RUST_BACKTRACE"] = "full"

num_resources = 5
resources = [
    dlt.resource([{"foo": "bar"}], name=f"r{n}")
    for n in range(num_resources)
]
pipe = dlt.pipeline(
    pipeline_name="delta_source",
    pipelines_dir="_storage",
    destination=filesystem("_storage"),
)

pipe.run(resources, table_format="delta")
for run in {1..100}; do python pipeline.py; done

Results:

  • old impl with try_get_deltatable: 100 runs, 16 panics
  • new impl: 100 runs, 0 panics

Old impl used try_get_deltatable because DeltaTable.is_deltatable() did not yet exist. It got added after I opened a ticket in the delta-rs repo.

Related Issues

Fixes #1808

Additional Context

  • also brings airflow back to make dev to prevent mypy errors

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 6581128
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/66eaebbfa46e1f0008ef0267
😎 Deploy Preview https://deploy-preview-1832--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jorritsandbrink jorritsandbrink marked this pull request as ready for review September 17, 2024 10:51
@sh-rp sh-rp force-pushed the fix/1808-delta-thread-panic branch from a2b541e to 6581128 Compare September 18, 2024 15:03
Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! tbh. no idea why this works :)

@rudolfix rudolfix merged commit ff1434b into devel Sep 19, 2024
60 of 61 checks passed
@rudolfix rudolfix deleted the fix/1808-delta-thread-panic branch September 19, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error when loading multiple resources into delta table format with multithreading
2 participants